<template>
	<div v-show="showPage">
		<div style="border-bottom: 1px solid #ddd;">
			<h3>UReport选择</h3>
		</div>
		<div style="margin-top: 10px;">
			报表
			<el-select size="mini" v-model="reportCode" placeholder="请选择"  clearable filterable>
				<el-option v-for="item in reportList" :key="item.value" :label="item.name" :value="item.value">
				</el-option>
			</el-select>
		</div>
	</div>
</template>

<script>
	import restUtil from '@/utils/restUtil.js';
	export default {
		name: "UReportSelectPage",
		props: ["scope"],
		data() {
			return {
				showPage:false,
				reportCode:"",
				reportList:[]
			}
		},
		methods: {
			setVisible(visible){
				this.showPage=visible;
				if(visible && this.reportList.length==0){
					this.getReportList();
				}
			},getReportList() {
				var that = this;
				restUtil.getAction(this,"webide/pagewizarddialog/initUReportSelectPage").then(
					function(response) {
						if (response.data.code == 1) {
							that.reportList = response.data.reportList;
						} else {
							that.$alert(response.data.message, '提示')
						}
					});
			},getReturnData(){
				return {"reportCode":this.reportCode};
			},getPreviousPage(){
				return "tableFieldSelectPage";
			},getNextPage(){
				return undefined;
			},isCompletedPage(){
				return true;
			}
		},
	}
</script>

<style>
</style>
